package br.edu.delta.model;

import java.math.BigDecimal;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

public class teste {

	public static void main(String[] args) {

		EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory("teste");
		
		EntityManager entityManager = entityManagerFactory.createEntityManager();
		
		Configuracoes configuracoes = new Configuracoes();
		
		entityManager.getTransaction().begin();
		
		configuracoes.setQtdMaximaItensEmprestimo(5);
		configuracoes.setTempoSessao(600);
		configuracoes.setValorMulta(new BigDecimal(2.0));
		
		entityManager.persist(configuracoes);
		
		entityManager.getTransaction().commit();
		
		entityManager.close();

	}

}
